<template>
  <j-modal
    :title="title"
    :width="width"
    :visible="visible"
    :fullscreen="true"
    switchFullscreen
    @ok="handleOk"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    @cancel="handleCancel"
    cancelText="关闭"
  >
    <salary-input-form ref="realForm" :reportId="reportId" @ok="submitCallback" ></salary-input-form>
  </j-modal>
</template>

<script>

  import SalaryInputForm from './SalaryInputForm'
  export default {
    name: 'SalaryReportModal',
    components: {
      SalaryInputForm
    },
    data () {
      return {
        title: '薪资录入',
        width: 800,
        visible: false,
        reportId: '',
        disableSubmit: false
      }
    },
    created() {
      console.log('reportId', this.reportId)
      // this.reportId = this.reportId
    },
    methods: {
      close () {
        this.$emit('close')
        this.visible = false
      },
      handleOk () {
        this.$refs.realForm.submitForm()
      },
      submitCallback() {
        this.$emit('ok')
        this.visible = false
      },
      handleCancel () {
        this.visible = false
      }
    }
  }
</script>
